package regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexTest
{

    public static void main(String[] args)
    {
        String regx = "(?=.*[a-z])(?=.*\\d)(?=.*[#@!~%^&*])[a-z\\d#@!~%^&*]{6,16}";
        Pattern pattern = Pattern.compile(regx);
        String pwd = "ngfhgfhfg";
        Matcher m = pattern.matcher(pwd);
        System.out.println(m.find());

    }

}
